#ifndef __VMRPLAYERSCROLLVIEW_H__
#define __VMRPLAYERSCROLLVIEW_H__

#include "View.h"
#include "LoadManager.h"

class VMRPlayer;
class Primitive;
class DXImage;
class DXButtonView;
class IParam;

class VMRPlayerScrollViewDelegate
{
public:
	virtual void scrollChangedPosition( void* param ) = 0;
	virtual void playButtonPressed( void* param ) = 0;
	virtual void pauseButtonPressed( void* param ) = 0;
};

class VMRPlayerScrollView : public View
{
public:
						VMRPlayerScrollView( const MRect& rect, DXImage* imageBack, DXImage* imageScroll, VMRPlayer* player );
						~VMRPlayerScrollView();
	
	void				track( bool isTrackOn );
	void				leftMouseDown( const IEvent& event );
	/*void				leftMouseUp( IEvent event );
	void				mouseMove( IEvent event );*/
	//bool				rollOver( IEvent event );
	//bool				rollOut( IEvent event );

	void				update();
	
	void							delegate( VMRPlayerScrollViewDelegate* delegate );
	VMRPlayerScrollViewDelegate*	delegate() const;
private:
	DXButtonView*					_playButton; 
	DXButtonView*					_pauseButton; 

	VMRPlayer*						_player;
	DXImage*						_imageBack;
	DXImage*						_imageScroll;
	VMRPlayerScrollViewDelegate*	_delegate;
	LoadManager< DXImage >			_imageManager;

	MRect							scrollRect;
private:
	void							play( IParam* param );
	void							pause( IParam* param );

};

#endif